<?php
if(!isset($_SESSION['userToken']) || !isset($_SESSION['userId']))
{
	header('HTTP/1.1 500 Session not initialized');
	exit;
} else
{
	if(!isset($_REQUEST['token']))
	{
		header('HTTP/1.1 500 improper call to service');
		exit;
	}

	if($_REQUEST['token'] != $_SESSION['userToken'])
	{
		header('HTTP/1.1 500 invalid token');
		exit;
	}
}
?>